package com.senven.common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 
 * </p>
 *
 * @author wt
 * @since 2022-08-31
 */
@TableName("tbl_order")
@ApiModel(value = "Order对象", description = "")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("订单id")
    @TableId(value = "order_id", type = IdType.AUTO)
    private Integer orderId;

    @ApiModelProperty("订单号")
    private String orders;

    @ApiModelProperty("支付方式")
    private String paymodelid;

    @ApiModelProperty("订单备注")
    private String remarks;

    @ApiModelProperty("下单时间")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime placeTime;


    @ApiModelProperty("订单状态,0,正在配送，1确认收获，2已评论")
    private Integer status;

    @ApiModelProperty("订单所属的店铺id")
    private Integer branchid;

    @ApiModelProperty("订单总价")
    private String total;

    @ApiModelProperty("收获地址")
    private String address;

    @TableField(exist = false)
    @ApiModelProperty("店铺名")
    private String branchname;

    @TableField(exist = false)
    @ApiModelProperty("店铺描述")
    private String describle;

    @TableField(exist = false)
    @ApiModelProperty("店铺图片地址")
    private String branchUrl;

    @TableField(exist = false)
    @ApiModelProperty("商品名")
    private String goodsname;

    @TableField(exist = false)
    @ApiModelProperty("商品价格")
    private Double goodsPrice;

    @TableField(exist = false)
    @ApiModelProperty("支付方式文字型")
    private String paymodels;

    @TableField(exist = false)
    @ApiModelProperty("商品图片地址")
    private String goodsUrl;

    @ApiModelProperty("商品数量")
    @TableField(exist = false)
    private Integer num;

    @ApiModelProperty("商家")
    @TableField(exist = false)
    private String username;

    @ApiModelProperty("商家电话")
    @TableField(exist = false)
    private String tel;

    @TableField(exist = false)
    private String userId;

    @TableField(exist = false)
    private List<PayOrder> orderList;

    public Order(Integer orderId, String orders, String paymodelid, String remarks, LocalDateTime placeTime, Integer status, Integer branchid, String total, String address,String userId,List orderList) {
        this.orderId = orderId;
        this.orders = orders;
        this.paymodelid = paymodelid;
        this.remarks = remarks;
        this.placeTime = placeTime;
        this.status = status;
        this.branchid = branchid;
        this.total = total;
        this.address = address;
        this.userId = userId;
        this.orderList = orderList;
    }

    public Order(){

    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }
    public String getOrders() {
        return orders;
    }

    public void setOrders(String orders) {
        this.orders = orders;
    }
    public String getPaymodelid() {
        return paymodelid;
    }

    public void setPaymodelid(String paymodelid) {
        this.paymodelid = paymodelid;
    }
    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }
    public LocalDateTime getPlaceTime() {
        return placeTime;
    }

    public void setPlaceTime(LocalDateTime placeTime) {
        this.placeTime = placeTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
    public Integer getBranchid() {
        return branchid;
    }

    public void setBranchid(Integer branchid) {
        this.branchid = branchid;
    }
    public String getTotal() {
        return total;
    }

    public void setTotal(String total) {
        this.total = total;
    }

    public String getBranchname() {
        return branchname;
    }

    public void setBranchname(String branchname) {
        this.branchname = branchname;
    }


    public String getDescrible() {
        return describle;
    }

    public void setDescrible(String describle) {
        this.describle = describle;
    }

    public String getBranchUrl() {
        return branchUrl;
    }

    public void setBranchUrl(String branchUrl) {
        this.branchUrl = branchUrl;
    }

    public String getGoodsname() {
        return goodsname;
    }

    public void setGoodsname(String goodsname) {
        this.goodsname = goodsname;
    }

    public Double getGoodsPrice() {
        return goodsPrice;
    }

    public void setGoodsPrice(Double goodsPrice) {
        this.goodsPrice = goodsPrice;
    }

    public String getPaymodels() {
        return paymodels;
    }

    public void setPaymodels(String paymodels) {
        this.paymodels = paymodels;
    }

    public String getGoodsUrl() {
        return goodsUrl;
    }

    public void setGoodsUrl(String goodsUrl) {
        this.goodsUrl = goodsUrl;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public List<PayOrder> getOrderList() {
        return orderList;
    }

    public void setOrderList(List<PayOrder> orderList) {
        this.orderList = orderList;
    }

    @Override
    public String toString() {
        return "Order{" +
                "orderId=" + orderId +
                ", orders='" + orders + '\'' +
                ", paymodelid='" + paymodelid + '\'' +
                ", remarks='" + remarks + '\'' +
                ", placeTime=" + placeTime +
                ", status=" + status +
                ", branchid=" + branchid +
                ", total='" + total + '\'' +
                ", address='" + address + '\'' +
                ", branchname='" + branchname + '\'' +
                ", describle='" + describle + '\'' +
                ", branchUrl='" + branchUrl + '\'' +
                ", goodsname='" + goodsname + '\'' +
                ", goodsPrice=" + goodsPrice +
                ", paymodels='" + paymodels + '\'' +
                ", goodsUrl='" + goodsUrl + '\'' +
                ", num=" + num +
                ", username='" + username + '\'' +
                ", tel='" + tel + '\'' +
                ", userId='" + userId + '\'' +
                ", orderList=" + orderList +
                '}';
    }
}
